<template>
	<view class="container">
		<!-- style="position:absolute; top:0; left:0; right:0; bottom:0;" -->
		<view @scroll="scroll" :scroll-top="scrollTop" scroll-y="true">
			<view class="container" v-if="detail.goods_id">
				<view class="swiper">
					<swiper :autoplay="autoplay" @change="setCurrent" class="banner-box  swiper-box" :duration="duration" :indicator-dots="indicatorDots" :interval="interval" :circular="true">
						<swiper-item v-for="(item, index) in detail.image" :key="index" @tap="onPreviewImages" :data-index="index"><image :fade="true" class="slide-image" mode="aspectFill" :src="item.file_path"></image></swiper-item>
					</swiper>
					<view class="banner-num">
						<text>{{ currentIndex }}</text>
						<text>/{{ detail.image.length }}</text>
					</view>
				</view>
				<view class="cont-box b-f">
					<view class="dis-flex flex-y-center">
						<view class="left flex-box dis-flex flex-dir-column">
							<!-- 商品名称 -->
							<view class="goods-title">
								<text class="title f-30 twolist-hidden">{{ detail.goods_name }}</text>
							</view>
							<!-- 商品卖点 -->
							<view class="goods-selling-point">
								<text class="f-24">{{ detail.selling_point }}</text>
							</view>
							<view class="money-box dis-flex flex-y-center">
								<!-- 商品价 -->
								<view class="goods-price">
									<text class="col-m f-26">积分：</text>
									<text class="goods-price_num col-m f-40">{{ goods_price }}</text>
								</view>
								<!-- 划线价 -->
								<view class="line-price" v-if="line_price > 0">
									<text>参考价：{{ line_price }}</text>
								</view>
							</view>
						</view>
						
					</view>
					<view class="goods-sales-box f-28 dis-flex col-8">
						<text class="flex-box num">已兑换：{{ detail.goods_sales }}件</text>
					</view>
				</view>
				<form v-if="goodsMultiSpec.spec_attr" @submit="onToggleTrade" report-submit>
					<button class="btn-normal" formType="submit">
						<view class="sku-selector cont-box b-f m-top20 dis-flex flex-y-center">
							<view class="flex-box f-28">
								<text class="col-9">选择：</text>
								<text v-for="(item, index) in goodsMultiSpec.spec_attr" :key="index">{{ item.group_name + ' ' }}</text>
							</view>
							<view class="f-26 col-9 t-r"><text class="suifont sui-xiangyoujiantou"></text></view>
						</view>
					</button>
				</form>

				<!-- 确认购买弹窗 -->
				<popup :show="showBottomPopup" type="bottom" @close="onToggleTrade">
					<view class="popup__trade">
						<!-- 关闭按钮 -->
						<view class="trade-close dis-flex flex-x-center flex-y-center" @tap="onToggleTrade"><text class="suifont sui-close f-26"></text></view>
						<!-- 主体信息 -->
						<view class="trade-main">
							<view class="goods-info dis-flex">
								<!-- 图片名称 -->
								<view class="goods-image" @tap="onPreviewSkuImage"><image :src="skuCoverImage"></image></view>
								<view class="right flex-box">
									<view class="money-box dis-flex flex-y-end">
										<!-- 商品价 -->
										<view class="goods-price">
											<text class="col-m f-26">积分：</text>
											<text class="goods-price_num col-m f-40">{{ goods_price }}</text>
										</view>
										<!-- 划线价 -->
										<view class="line-price" v-if="line_price > 0">
											<text>售价：{{ line_price }}</text>
										</view>
									</view>
									<view class="goods-stock dis-flex">
										<text class="flex-box f-26 col-7">库存：{{ stock_num }}</text>
									</view>
								</view>
							</view>
							<!-- 规格列表 -->
							<view class="goods-attr">
								<!-- 滚动容器 -->
								<scroll-view class="goods-attr--scroll" :scroll-y="true">
									<view class="group-item" v-for="(attr, attr_idx) in goodsMultiSpec.spec_attr" :key="attr_idx">
										<view class="tips-text" :data-id="attr.group_id">{{ attr.group_name }}</view>
										<view class="spec-item" :class="{ cur: item.checked }" v-for="(item, item_idx) in attr.spec_items" :key="item_idx" :data-attr-idx="attr_idx" :data-item-idx="item_idx" @tap="onSwitchSpec">{{ item.spec_value }}</view>
									</view>
								</scroll-view>
							</view>
							<!-- 购买数量 -->
							<view class="buy_number">
								<view class="buyNumber f-26"><text>购买数量</text></view>
								<view class="selectNumber">
									<u-number-box v-model="goods_num" :min="1" :max="stock_num"></u-number-box>
									<!-- <form @submit="onDecGoodsNumber" report-submit="true"><button formType="submit" class="default" type="default" :class="{ 'default-active': !(goods_num > 1) }">-</button></form>
									<input type="number" v-model="goods_num" />
									<form @submit="onIncGoodsNumber" report-submit="true"><button formType="submit" class="default" type="default">+</button></form> -->
								</view>
							</view>
						</view>
						<!-- 底部操作栏 -->
						<view class="footer-fixed f-30">
							<block v-if="stock_num > 0">
								<view class="order-bt" style="flex: 1;" @tap="onConfirmSubmit">立即兑换</view>
							</block>
							<view class="default-btn" v-else>暂无现货</view>
						</view>
					</view>
				</popup>
				<!-- 商品描述 -->
				<view class="p-bottom">
					<view class="top-nav m-top20 b-f b-b"><view class="top-nav-bar">商品描述</view></view>
					<view class="order" :hidden="hiddenOrder">
						<view v-if="detail.content != ''">
							<view class="b-f goods-detail-box">
								<!-- <rich-text :nodes="content"></rich-text> -->
								<u-parse :html="content"  :autosetTitle="false" :lazy-load="true"></u-parse>
								<!-- <view class="goods-cont-li"> -->
								<!-- <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> -->
								<!-- </view> -->
							</view>
						</view>
						<view v-else>
							<view class="yoshop-notcont">
								<text class="suifont sui-wushuju"></text>
								<text class="cont">亲,此处暂无详情数据</text>
							</view>
						</view>
					</view>
				</view>
				<!-- 底部操作栏 -->
				<view class="footer-fixed f-30">
					<!-- 在线客服 -->
					<view class="order-bt" style="flex: 1;" @tap="onToggleTrade">立即兑换</view>
				</view>
			</view>
		</view>
		<!-- 返回顶部 -->
		<view @tap="onScrollTop" class="widget-goTop" v-if="floorstatus"><text class="suifont sui-fanhuidingbu"></text></view>
		
	</view>
</template>

<script>
let goodsSpecArr = [];
import actionsheet from '@/components/actionsheet/index.vue';
import Tools from '@/utils/Tools.js';
import popup from '@/components/popup/index.vue';
export default {
	components: {
		popup,
		actionsheet
	},
	data() {
		return {
			goods_id: 0,
			indicatorDots: true, // 是否显示面板指示点
			autoplay: true, // 是否自动切换
			interval: 3000, // 自动切换时间间隔
			duration: 800, // 滑动动画时长

			currentIndex: 1, // 轮播图指针
			floorstatus: false, // 返回顶部
			showView: true, // 显示商品规格

			detail: {}, // 商品详情信息
			goods_price: 0, // 商品价格
			line_price: 0, // 划线价格
			stock_num: 0, // 库存数量

			goods_num: 1, // 商品数量
			goods_sku_id: 0, // 规格id
			cart_total_num: 0, // 购物车商品总数量
			goodsMultiSpec: { spec_attr: {} }, // 多规格信息
			specData: {},
			skuCoverImage: '',
			hiddenOrder: false,

			showBottomPopup: false,
			scrollTop: null,
			qrcode: '',
			content: '',
			tel: '',
		};
	},
	onLoad(e) {
		let scene = Tools.getSceneData(e);
		// 商品id
		this.goods_id = e.goods_id ? e.goods_id : scene.gid;
		// 获取商品信息
		this.getGoodsDetail();
	},
	onShow() {
	},
	onPageScroll(e) {
		this.floorstatus = e.scrollTop > 200;
	},

	methods: {
		/**
		 * 获取商品信息
		 */
		getGoodsDetail() {
			this.$u.api.getPointsGoodsInfo(this.goods_id).then(res => {
				let data = this.initGoodsDetailData(res.data);
				this.cart_total_num = data.cart_total_num;
				this.detail = data.detail;
				this.goods_price = data.goods_price;
				this.goods_sku_id = data.goods_sku_id;
				this.line_price = data.line_price;
				this.skuCoverImage = data.skuCoverImage;
				this.specData = data.specData;
				this.stock_num = data.stock_num;
				this.goodsMultiSpec = data.goodsMultiSpec || {};
				this.hiddenOrder = data.hiddenOrder || false;
				uni.setNavigationBarTitle({
					title: data.detail.goods_name
				});
				this.$nextTick(() => {
					// #ifdef H5
					// this.$wechat.initJssdk(this.setShare());
					// #endif
				});
			});
		},
		/**
		 * 初始化商品详情数据
		 */
		initGoodsDetailData(data) {
			// 商品详情
			let goodsDetail = data.detail;
			// 富文本转码
			if (goodsDetail.content.length > 0) {
				this.content = Tools.formatRichText(goodsDetail.content);
				// wxParse.wxParse('content', 'html', goodsDetail.content, _this, 0);
			}
			// 商品价格/划线价/库存
			data.goods_sku_id = goodsDetail.goods_sku.spec_sku_id;
			data.goods_price = goodsDetail.goods_sku.goods_price;
			data.line_price = goodsDetail.goods_sku.line_price;
			data.stock_num = goodsDetail.goods_sku.stock_num;
			// 商品封面图(确认弹窗)
			data.skuCoverImage = goodsDetail.goods_image;
			// 多规格商品封面图(确认弹窗)
			if (goodsDetail.spec_type == 20 && goodsDetail.goods_sku['image']) {
				data.skuCoverImage = goodsDetail.goods_sku['image']['file_path'];
			}
			// 初始化商品多规格
			if (goodsDetail.spec_type == 20) {
				data.goodsMultiSpec = this.initManySpecData(goodsDetail.goods_multi_spec);
			}
			return data;
		},
		/**
		 * 初始化商品多规格
		 */
		initManySpecData(data) {
			goodsSpecArr = [];
			for (let i in data.spec_attr) {
				for (let j in data.spec_attr[i].spec_items) {
					if (j < 1) {
						data.spec_attr[i].spec_items[0].checked = true;
						goodsSpecArr[i] = data.spec_attr[i].spec_items[0].item_id;
					}
				}
			}
			return data;
		},

		/**
		 * 显示/隐藏 返回顶部按钮
		 */
		scroll(e) {
			this.floorstatus = e.detail.scrollTop > 200;
		},
		/**
		 * 跳转购物车页面
		 */
		onTriggerCart() {
			this.navigateTo({
				url: '/pageShop/flow/index'
			});
		},

		/**
		 * 立即购买
		 */
		onConfirmSubmit(e) {
			// 表单验证
			if (!this.onVerify()) {
				return false;
			}
			this.navigateTo({
				url:
					'/pageShop/points/checkout' +
					this.$u.queryParams(
						{
							goods_id: this.goods_id,
							goods_num: this.goods_num,
							goods_sku_id: this.goods_sku_id
						}
					),
				success: () => {
					// 关闭弹窗
					this.onToggleTrade();
				}
			});
		},

		/**
		 * 表单验证
		 */
		onVerify() {
			if (this.goods_num === '') {
				Tools.showError('请输入购买数量');
				return false;
			}
			// 将购买数量转为整型，防止出错
			this.goods_num = parseInt(this.goods_num);

			if (this.goods_num <= 0) {
				Tools.showError('购买数量不能为0');
				return false;
			}
			return true;
		},
		/**
		 * 点击切换不同规格
		 */
		onSwitchSpec(e) {
			let attrIdx = e.currentTarget.dataset.attrIdx;
			let itemIdx = e.currentTarget.dataset.itemIdx;
			let goodsMultiSpec = this.goodsMultiSpec;
			for (let i in goodsMultiSpec.spec_attr) {
				for (let j in goodsMultiSpec.spec_attr[i].spec_items) {
					if (attrIdx == i) {
						goodsMultiSpec.spec_attr[i].spec_items[j].checked = false;
						if (itemIdx == j) {
							goodsMultiSpec.spec_attr[i].spec_items[itemIdx].checked = true;
							goodsSpecArr[i] = goodsMultiSpec.spec_attr[i].spec_items[itemIdx].item_id;
						}
					}
				}
			}
			this.goodsMultiSpec = goodsMultiSpec;
			// 更新商品规格信息
			this.updateSpecGoods();
		},

		/**
		 * 更新商品规格信息
		 */
		updateSpecGoods() {
			let specSkuId = goodsSpecArr.join('_');
			// 查找skuItem
			let spec_list = this.goodsMultiSpec.spec_list;
			let skuItem = spec_list.find(val => {
				return val.spec_sku_id == specSkuId;
			});
			// 记录goods_sku_id
			// 更新商品价格、划线价、库存
			if (typeof skuItem === 'object') {
				this.goods_sku_id = skuItem.spec_sku_id;
				this.goods_price = skuItem.form.goods_price;
				this.line_price = skuItem.form.line_price;
				this.stock_num = skuItem.form.stock_num;
				this.skuCoverImage = skuItem.form.image_id > 0 ? skuItem.form.image_path : this.detail.goods_image;
			}
		},
		/**
		 * 设置轮播图当前指针 数字
		 */
		setCurrent(e) {
			this.currentIndex = e.detail.current + 1;
		},
		/**
		 * 确认购买弹窗
		 */
		onToggleTrade(e) {
			this.showBottomPopup = !this.showBottomPopup;
		},
		/**
		 * 显示分享选项
		 */
		onClickShare(e) {
			this.$set(this.share, 'show', true);
		},
		/**
		 * 关闭分享选项
		 */
		onCloseShare() {
			this.$set(this.share, 'show', false);
		},
		/**
		 * 点击生成商品海报
		 */
		onClickShareItem(e) {
			if (e.index == 0) {
				// 显示商品海报
				this.showPoster();
			} else if (e.index == 1) {
				Share.send(Tools.getShareUrl(Tools.getPagePath(), { goods_id: this.goods_id }));
			}
			this.onCloseShare();
		},
		// /**
		//  * 点击生成商品海报
		//  */
		// onClickShareItem(e) {
		// 	this.showPoster();
		// },
		/**
		 * 显示商品海报图
		 */
		showPoster() {
			this.$u.api.getGoodsPoster(this.goods_id).then(res => {
				this.qrcode = res.data.qrcode;
				this.$nextTick(() => {
					this.onTogglePopup();
				});
			});
		},
		/**
		 * 切换商品海报
		 */
		onTogglePopup() {
			this.$set(this.share, 'showPopup', !this.share.showPopup);
		},

		/**
		 * 跳转到评论
		 */
		onTargetToComment() {
			this.navigateTo({
				url: './comment/comment?goods_id=' + this.goods_id
			});
		},
		onScrollTop() {
			uni.pageScrollTo({
				scrollTop: 0
			});
		},
		/**
		 * 浏览商品图片
		 */
		onPreviewImages(e) {
			let index = e.currentTarget.dataset.index;
			let imageUrls = [];
			this.detail.image.forEach(item => {
				imageUrls.push(item.file_path);
			});
			uni.previewImage({
				current: imageUrls[index],
				urls: imageUrls
			});
		},

		/**
		 * 预览Sku规格图片
		 */
		onPreviewSkuImage(e) {
			uni.previewImage({
				current: this.skuCoverImage,
				urls: [this.skuCoverImage]
			});
		},
		/**
		 * 保存海报图片
		 */
		onSavePoster(e) {
			// 记录formId
			// #ifdef H5
			uni.showToast({
				title: '当前环境不支持下载图片，请长按保存',
				icon: 'none'
			});
			return false;
			// #endif
			uni.showLoading({
				title: '加载中'
			});
			// 下载海报图片
			uni.downloadFile({
				url: this.qrcode,
				success: res => {
					uni.hideLoading();
					// 图片保存到本地
					uni.saveImageToPhotosAlbum({
						filePath: res.tempFilePath,
						success: data => {
							uni.showToast({
								title: '保存成功',
								icon: 'success',
								duration: 2000
							});
							// 关闭商品海报
							this.onTogglePopup();
						},
						fail: err => {
							if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
								uni.showToast({
									title: '请允许访问相册后重试',
									icon: 'none',
									duration: 1000
								});
								setTimeout(() => {
									uni.openSetting();
								}, 1000);
							}
						}
					});
				}
			});
		}
	}
};
</script>

<style>
.slide-image {
	background: #fff;
}

.banner-box {
	height: 750rpx;
	border-bottom: 1rpx solid #e4e4e4;
}

.user-orderJtou {
	color: #999;
	font-size: 26rpx;
	position: absolute;
	top: 50%;
	margin-top: -9rpx;
}

/* 底部操作栏 */

.footer-fixed .goods-fixed-icon {
	width: 150rpx;
	background: #fff;
	margin: 0 auto;
	padding: 0 6rpx;
	border-left: 1rpx solid #eee;
	height: 92rpx;
	position: relative;
}

.footer-fixed .goods-fixed-icon:first-child {
	border-left: none;
}

.footer-fixed .goods-fixed-icon image {
	width: 60rpx;
	height: 60rpx;
	display: block;
	position: absolute;
	left: 0%;
	margin-left: 30rpx;
	top: 0%;
	margin-top: 17rpx;
}

.footer-fixed .goods-fixed-icon text {
	color: #7a7e83;
	font-size: 48rpx;
}

.footer-fixed .goods-fixed-icon .bargain-icon {
	height: 50rpx;
}

.footer-fixed .goods-fixed-icon .bargain-icon image {
	height: 50rpx;
	width: 50rpx;
	margin-top: -40rpx;
}

.footer-fixed .goods-fixed-icon .bargain-home {
	margin-top: 6rpx;
	text-align: center;
}

.footer-fixed .goods-fixed-icon .flow_num text {
	display: block;
	color: #fff;
	font-size: 22rpx;
	text-align: center;
}

.footer-fixed .goods-fixed-icon .icon-shoucang {
	font-size: 40rpx;
}

.footer-fixed .goods-fixed-icon .s_cont {
	color: #ff495e;
}

/* 商品标题 */

.goods-title {
	overflow: hidden;
	padding: 0 0rpx 0 0;
	color: #333;
}

/* 商品价格 */

.money-box {
	margin: 10rpx 0;
}

.money-box .goods-price .goods-price_num {
	font-size: 40rpx;
}

.money-box .line-price {
	font-size: 24rpx;
	color: #999;
	padding-top: 6rpx;
	text-decoration: line-through;
	margin-left: 12rpx;
}

/* 会员价标签 */

.tag-grade-price {
	background: linear-gradient(to right, #fa1e8c 0, #fc1e56 100%);
	background: #fc1e56;
	font-size: 22rpx;
	border-radius: 12rpx;
	color: #fff;
	padding: 4rpx 12rpx;
	margin-left: 20rpx;
}

/* 商品销量 */

.goods-sales-box .stock {
	display: block;
	text-align: right;
}

/* 商品评论 */

.goods-comment .goods-property-box {
	position: relative;
	padding: 12px;
}

.goods-comment .goods-property-jianTou {
	width: 52rpx;
	position: absolute;
	right: 0;
	top: 50%;
	margin-top: -13rpx;
}

.goods-comment .goods-property-jianTou image {
	height: 100%;
	width: 100%;
}

.goods-comment-box .comment_btn {
	width: 220rpx;
	margin: 0 auto;
	padding: 20rpx 0;
}

.goods-comment-box .comment_btn text {
	display: block;
	padding: 5rpx 0;
	color: #ff495e;
	font-size: 26rpx;
	text-align: center;
	border: 1px solid #ff495e;
	border-radius: 30rpx;
}

/* 商品规格 */

.goods-attr {
	padding: 10rpx 0;
}

.goods-attr .goods-attr--scroll {
	max-height: 600rpx;
}

.goods-attr .group-item .tips-text {
	font-size: 26rpx;
	color: #888;
	margin-bottom: 10rpx;
}

.goods-attr .group-item .spec-item {
	display: inline-block;
}

.goods-attr .group-item .spec-item {
	font-size: 26rpx;
	height: 55rpx;
	line-height: 55rpx;
	padding: 0 30rpx;
	margin: 0 20rpx 20rpx 0;
	border-radius: 8rpx;
	color: #888;
	border: 1px solid #e6e6e6;
}

.goods-attr .group-item .spec-item.cur {
	background: #f82169;
	border: 1rpx solid #f82169;
	color: #fff;
}

.goods-attr .group-item .spec-item.cur:after {
	position: absolute;
	bottom: 0;
	right: 0;
	content: '';
	display: inline-block;
	width: 16rpx;
	height: 16rpx;
}

.goods-attr .group-item .spec-item.disabled {
	color: #dedede;
	cursor: not-allowed;
	background: #eee;
	border: 2rpx dashed #dedede;
}

/* banner计数 */

.banner-num {
	position: absolute;
	right: 30rpx;
	margin-top: -70rpx;
	padding: 0 18rpx;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 50rpx;
	color: #fff;
	font-size: 32rpx;
}

.banner-num text:last-child {
	color: rgba(255, 255, 255, 0.6);
	font-size: 26rpx;
}

.footer-fixed .order-number {
	width: 50%;
	background: linear-gradient(to right, #fac905 0, #ff9500 100%);
	color: #fff;
	text-align: center;
	line-height: 92rpx;
}

.footer-fixed .order-number button {
	background: none;
	padding: 0;
	font-size: 34rpx;
	color: #fff;
	line-height: inherit;
	border-radius: 0;
	border: 0;
}

.footer-fixed .order-number button::after {
	content: ' ';
	width: 0;
	height: 0;
	position: absolute;
	top: 0;
	left: 0;
	border: none;
	transform: scale(0);
	transform-origin: 0 0;
	box-sizing: border-box;
	border-radius: 0;
}

.footer-fixed .default-btn {
	width: 100%;
	background-color: #ccc;
	color: #fff;
	text-align: center;
	line-height: 92rpx;
}

.footer-fixed .flow_num {
	background: #ff495e;
	position: absolute;
	right: 20rpx;
	top: 10rpx;
	border-radius: 30rpx;
	height: 30rpx;
	min-width: 30rpx;
}

/* 商品详情 */

.goods-detail-box {
	font-size: 28rpx;
}

/* 评价次数 */

.comment-num {
	position: absolute;
	right: 34px;
	top: 50%;
	margin-top: -20rpx;
	font-size: 28rpx;
	color: #333;
}

.top-nav-bar {
	padding: 24rpx;
	font-size: 28rpx;
	color: #333;
}

.goods-fixed-icon contact-button {
	display: block;
}

/* 商品分享 */

.goods__share button.share-btn {
	line-height: normal;
	padding: 0 0 0 10rpx;
	background: none;
	border-radius: 0;
	box-shadow: none;
	font-size: 8pt;
	border: none;
	color: #888;
}

.goods__share button.share-btn::after {
	border: none;
}

.goods__share .share__icon {
	font-size: 46rpx;
	margin-bottom: 5rpx;
}

/* 商品海报 弹出层 */

.pop-poster {
	position: relative;
	background: #fff;
	padding: 42rpx;
	border-radius: 10rpx;
}

/* 关闭按钮 */

.pop-poster .pop-close {
	position: absolute;
	width: 56rpx;
	height: 56rpx;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 0 25rpx rgba(0, 0, 0, 0.15);
	right: -28rpx;
	top: -28rpx;
}

.pop-poster .pop-close text {
	display: block;
}

.pop-poster .poster__image {
	padding: 0 40rpx;
}

.pop-poster .poster__image image {
	box-shadow: 0 0 25rpx rgba(0, 0, 0, 0.15);
	width: 460rpx;
	height: 696.746rpx;
}

.pop-poster .profile-btn button {
	margin-bottom: 0;
}

/* sku选择器 */

.sku-selector {
	padding: 30rpx 20rpx;
}

/* 确认购买弹窗 */

.popup__trade {
	width: 750rpx;
	position: relative;
	padding-bottom: 92rpx;
	z-index: 999;
}

.popup__trade .trade-close {
	position: absolute;
	top: 20rpx;
	right: 20rpx;
	width: 50rpx;
	height: 50rpx;
}

.popup__trade .trade-main {
	background: #fff;
	box-sizing: border-box;
	padding: 24rpx;
}

.popup__trade .footer-fixed {
	position: absolute;
}

.popup__trade .trade-main .goods-info {
	margin-bottom: 10rpx;
}

.popup__trade .trade-main .goods-info .goods-image {
	margin-top: -40px;
	margin-right: 20rpx;
	background: #eee;
}

.popup__trade .trade-main .goods-info .goods-image image {
	width: 90px;
	height: 90px;
	border: 5rpx solid #fff;
	box-shadow: 0 4rpx 10rpx rgba(220, 220, 220, 0.79);
}

.popup__trade .trade-main .goods-info .money-box {
	margin: 0;
}

.popup__trade .trade-main .goods-info .goods-stock {
	padding-left: 10rpx;
}

.popup__trade .trade-main .buy_number {
	margin: 20rpx 0;
	justify-content: space-between;
}

.popup__trade .trade-main .buy_number .buyNumber {
	color: #888;
	background: #fff;
	border-radius: 10rpx;
	margin-bottom: 10rpx;
}

/* 商品卖点 */

.goods-selling-point {
	color: #f20c59;
}

.footer-fixed .goods-fixed-icon .kefu-image {
	width: 60rpx;
	height: 60rpx;
	position: relative;
	margin: 0;
}
</style>
